<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title> LA2ETLAK! </title>
  <%= stylesheet_link_tag    "mobile_style"%> 
</head>
   <header class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container" style="padding-left:1%;padding-right:1%;height:60px"align="center">
          <ul class="nav">
          <a href="<%= url_for :controller => "users", :action => "feed" %>" id="logo" ><h2 class = "pull-left" style = "float:up">LA2ETLAK</h2></a>
        
        <% if current_user != nil %>
        
            <li><%= link_to (image_tag("gear.png")) , {:controller => "users" , :action =>
              "settings"}, {:style => 'width:23px;height:28px;padding-top:15;padding-left:15px;border-color:white'}%></li>
          
         <% if current_user.notifications <= 0 %>
          
            <li><%= button_to '0' , {:controller => "users" , :action =>
              "notifications"}, :class => 'btn btn-large' , :style => 'width:33px;height:28px;padding-left:20%;margin-top:13;'%></li>
          
          <% else %>
          
            <li><%= button_to current_user.notifications , {:controller => "users" , :action =>
              "notifications"}, :class => 'btn btn-large btn-primary' , :style => 'width:33px;height:28px;margin-top:13;border-color:white;padding-left:20%'%></li>
            
          <% end %>

            <li><%= link_to (image_tag("search.png")) , {:controller => "users" , :action =>
              "search"}, {:style => 'width:38px;height:23px;padding-top:8;padding-left:1%;border-color:white'}%></li>
            </ul> 
        <% end %>
        </div>
      </div>
</header>
<!--
<% if current_user %>
  <% if current_user.get_notifications %> -->
   <!-- if user has notification display this active div which
        redirects to pending requests page
        Author: Menisy -->
   <!--<a href="<%= url_for(controller: "friendships", action: "pending") %>" >
    <div id="notification" class="flash-yellow well">
      <% n = current_user.get_notifications.length %>
    You have <%= n %> pending friendship <%= "request".pluralize(n) %>!
    </div>
   </a>
  <% end %>
<% end %>
-->
<!-- If a flash notice has been set, display it with the proper
    color
    Author: Menisy -->
<% keys = flash.keys %>
<% keys.each do |key| %>
  <% fl = flash[key] %>
  <% if fl == "" then next end %>
  <% color = fl["$red"] || fl["$green"] || fl["$yellow"] || fl["$blue"]%>
  <% if color %>
    <% fl[color] = "" %>
  <% else %>
    <% color = "$yellow" %>
  <% end %>
  <div id="<%= key.to_s %>" class="flash-<%= color[1,10] %> well"> <!-- assigning css color class triming tailing $ -->
  <%= raw fl %>
  <% flash[key] = "" %>
  </div>
<% end %>
  <!-- <body style="padding-top:50px;"> -->
  <body>
    <%= yield %>
  </body>
</html>
